#include "CPropertys.h"
#include <QDebug>
#include <QVariant>
#include <QMetaObject>
#include <QMetaProperty>

CPropertys::CPropertys(QObject *parent)
    : QObject{parent}
{

}

void CPropertys::printPropertys(QObject *obj)
{
    for(int i = 0; i < obj->metaObject()->propertyCount(); i++){
        QMetaProperty metaProperty = obj->metaObject()->property(i);
        qDebug()<<QString("Property name:%1 typeName:%2 typeId:%3 ")
                  .arg(metaProperty.name()).arg(metaProperty.typeName()).arg(metaProperty.typeId())
               << " value:" << metaProperty.read(obj);
    }
}
